import request from "./index.ts";
import {datePickerProps} from "vant";

export  const addTeam = async (data) => {
    return await request.post("/team/add",data)
}

export const getTeamList = async (description = '',status = null) => {
    return await request.get("/team/list",{
        params:{
            description: description,
            status:status
        }
    })
}

export const joinTeam = async (data) => {
    return await request.post("/team/jointeam",data)
}

export const quitTeam = async (data) => {
    return await request.post("/team/quitteam",data)
}

export const getmyCreateTeam = async (userId) => {
    return await request.get("/team/listmycreate",{
        params:{
            id: userId
        }
    })
}

export const getmyJoinTeam = async (userId) => {
    return await request.get("/team/listmy",{
        params:{
            id: userId
        }
    })
}

export const updateTeam = async (data) => {
    return await request.post("/team/update",data)
}